﻿using System;
using System.Web.Mvc;

namespace Equation.Enterprise.Framework.Web.Controller
{
    public static class ControllerExtensions
    {
        public static bool IsController(Type type)
        {
            return type != null &&
                   type.Name.EndsWith("Controller", StringComparison.OrdinalIgnoreCase) &&
                   !type.IsAbstract &&
                   typeof (IController).IsAssignableFrom(type);
        }
    }
}
